*******
******* 
******* JCR Wartime Coups
******* Monthly Data Analyses 
*******
******* July 2020  
*******  
******* For datamanage and descriptive statistics, read the R files.
******* 

use "C:\Users\Dell User\Dropbox\Wartimeleader\Data\Leader_Year\wartime_base_89.dta", clear

xtset obsid yrmonth 
  
gen milbudget = log(milex/rgdpe)
gen ln_negotion_yrs = log(max_negotiation_yrs)

gen mean12_culp = mean12_deaths_a_culp_Fin_FirstL+  mean12_deaths_b_culp_Fin_FirstL 
gen mean12_nonculp= mean12_deaths_a_nonclp_Fn_FrstL  + mean12_deaths_b_nonclp_Fn_FrstL 
 
  



**********
**********
********** Main Table Results 
**********
**********

 
set more off	
eststo clear 

****** 
****** War Time 
****** 
 
**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop     ln_statecoupmonth ln_solpay
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    
	
	
********
******** With a Negotiation Control 
********
 
 
**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop     ln_statecoupmonth ln_solpay  negotiation
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay   negotiation 
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 

 
 
********
********
******* Negotiation 
******** 
********
 
# delimit; 
eststo:   relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay
if  (negotiation==1 &!(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;
  
# delimit; 
eststo:   relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay   
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;
     
 
 
**** Table results
esttab, star(* 0.10 ** 0.05 *** 0.01) label noomitted nobase 
  
 

*** For Latex   
esttab using "C:/Users/Dell User/Dropbox/Wartimeleader/Paper/test1", replace b(3) se(3) label eqlabels(none) nonotes noomitted nobase nodepvars nogap nomtitle booktabs ///
star(* 0.10  ** .05 *** .01)  ///
stats(N r2, fmt(0 2) labels("N" "R2")) ///
        prefoot(" \addlinespace") postfoot("\bottomrule \end{tabular}}")

		
 

 
 
 
 

 
 
******************
****************** Substantive impact (Figures in the main texts)
******************

*****
**** H1  (Model 1 in Table 1)
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop     ln_statecoupmonth ln_solpay
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode);  

 
  
	
* Pr(DV) when government casualty is at 25th percentile   
#delimit;   
setx   ln_mean12_a_culp_FinFirstL   p25  ln_mean12_a_nonculp_FinFirstL 0
             (   ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean  N_Dyad ln_rgdpech_pwt ln_tpop     ln_statecoupmonth ln_solpay  ) mean 
				  ( gwf_dem  gwf_mil  )median
				   if ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 ) ;
  
 
relogitq, pr  
*robabilities and confidence intervals based on initial X-values
 *Probabilities and confidence intervals based on initial X-values
 *  Pr(noninsidercoup==1)  =  0.00057
 *  95% Confidence Interval =  0.00011 to .00263324

 

* Pr(DV) when government casualty is at 75th percentile   
#delimit;   
setx   ln_mean12_a_culp_FinFirstL   p75  ln_mean12_a_nonculp_FinFirstL 0
             (   ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean  N_Dyad ln_rgdpech_pwt ln_tpop     ln_statecoupmonth ln_solpay  ) mean 
				  ( gwf_dem  gwf_mil  )median
				   if ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 ) ;
 
relogitq, pr  
 *Probabilities and confidence intervals based on initial X-values
 *  Pr(noninsidercoup==1)  =  0.00089
 *  95% Confidence Interval =  0.00019 to .00501154



display (0.00089-  0.00057)/0.00057
***.56140351 
 
 
 
 
******
*****First Difference  
******

relogitq, fd(pr) changex(ln_mean12_a_culp_FinFirstL   p25  p75)
  
* First difference 1: ln_mean12_a_culp_FinFirstL p25 p75
*  dPr(noninsidercoup==1)  =  0.00031
*   95% Confidence Interval =  0.00003 to .00179808


  
   
   


*****
***** H2 (Model 6)
******
 
 
# delimit; 
eststo:   relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay   
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;
     
 
 
* Pr(DV) when then government casualty for non-culpable conflict is at 25 percentile 
#delimit;   
setx   ln_mean12_a_nonculp_FinFirstL   p25     ln_mean12_a_culp_FinFirstL     0    
                  	   		  (  ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   N_Dyad
            ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay       ) mean 
			  (   gwf_dem  gwf_mil )median
				   if ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 ) ;
 
 

    
relogitq, pr  
 *obabilities and confidence intervals based on initial X-values
 * Pr(insidercoup==1)  =  0.00436
  * 95% Confidence Interval =  0.00045 to .04506326

  
  
* Pr(DV) when then government casualty for non-culpable conflict is at 75 percentile 
#delimit;   
setx   ln_mean12_a_nonculp_FinFirstL   p75     ln_mean12_a_culp_FinFirstL     0    
                  	   		  (  ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   N_Dyad
            ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay       ) mean 
			  (   gwf_dem  gwf_mil )median
				   if ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 ) ;
 
 
relogitq, pr  
*  Pr(insidercoup==1)  =  0.01584
* 95% Confidence Interval =  0.00277 to .08603561



display ( 0.01584  -  0.00436   )/   0.00436

*2.6330275

******
*****First Difference  
******
 
relogitq, fd(pr) changex(ln_mean12_a_nonculp_FinFirstL  p25  p75)
   
 
*First difference 1: ln_mean12_a_nonculp_FinFirstL p25 p75
 * dPr(insidercoup==1)  =  0.01157
  * 95% Confidence Interval =  0.00099 to .06828868

 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 

*********************
*********************
********************* Tables in Online Appendix  
*********************
*********************

********************
******************** Entry Manner and Regime-Change Coup Exit 
******************** 
 
set more off	
eststo clear 


*** 	
*** Wartime Sample (Regime-coup entry)   
*** 
 

**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean     gwf_dem   N_Dyad gwf_mil
            ln_rgdpech_pwt ln_tpop     ln_coupattemptyrs regular_entry regimecoup_entry    
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 **** H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem N_Dyad  gwf_mil
                  ln_rgdpech_pwt ln_tpop    ln_coupattemptyrs regular_entry regimecoup_entry  
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
      
 
  
**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean     gwf_dem   N_Dyad
            ln_rgdpech_pwt ln_tpop      ln_warduration   regular_entry regimecoup_entry  gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 **** H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem N_Dyad 
                  ln_rgdpech_pwt ln_tpop  ln_warduration  regular_entry regimecoup_entry  gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
      
 
  
  
  
****
**** Negotiation sample
****

* H1 
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                 ln_mean12_distance  lag1t25_fightcap_mean gwf_dem  N_Dyad gwf_mil
                  ln_rgdpech_pwt   ln_tpop          ln_coupattemptyrs regular_entry regimecoup_entry  
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;


 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                 ln_mean12_distance  lag1t25_fightcap_mean gwf_dem    N_Dyad  gwf_mil
                 ln_rgdpech_pwt   ln_tpop         ln_coupattemptyrs regular_entry regimecoup_entry   
if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

     
	 
	 

* H1 
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                 ln_mean12_distance  lag1t25_fightcap_mean gwf_dem  N_Dyad
                  ln_rgdpech_pwt   ln_tpop   ln_warduration   regular_entry regimecoup_entry  gwf_mil
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;


 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                 ln_mean12_distance  lag1t25_fightcap_mean gwf_dem    N_Dyad
                 ln_rgdpech_pwt   ln_tpop      ln_warduration     regular_entry regimecoup_entry  gwf_mil
if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

     
	 
	 
**** Table results
esttab, star(* 0.10 ** 0.05 *** 0.01) label noomitted nobase 
  
 

*** For Latex   
esttab using "C:/Users/Dell User/Dropbox/Wartimeleader/Paper/test1", replace b(3) se(3) label eqlabels(none) nonotes noomitted nobase nodepvars nogap nomtitle booktabs ///
star(* 0.10  ** .05 *** .01)  ///
stats(N r2, fmt(0 2) labels("N" "R2")) ///
        prefoot(" \addlinespace") postfoot("\bottomrule \end{tabular}}")

		 
		 
		 
		 
		
 
 
 
 
 
  




********************
********************  Online Appendix: Endogeneity for Miltiary Performance and Types of coups
********************
  
 * Potential omitted variable biases that affect military effectiveness and each type of coups 
 
set more off	
eststo clear 

 
	
*****
 **** Personal 
 ***** 
 **** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth   gwf_personal  gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth   gwf_personal   gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
	 
	 
	 
	 
 
**** 
**** Coup-Proofing
****

**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth  cp_BS   gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    


 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
               ln_rgdpech_pwt ln_tpop   ln_statecoupmonth  cp_BS gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
 
 
  
 
   
*****
 ****  Size of Excluded ethnic group 
 ***** 
 **** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth   excluded_relnumber  gwf_mil 
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth   excluded_relnumber  gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
	 
	 
	  
 
 
****
**** Military Budget and Soldier Pay 
****

**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    ln_milex gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
               ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    ln_milex  gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
	  
 
 
 **** 
 **** Military expenditure / GDP (Logged)
 ****

**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    milbudget gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
               ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    milbudget  gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
	  
 
 
****
**** Military Budget and Soldier Pay 
****

**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    ln_solpay gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
               ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    ln_solpay   gwf_mil
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
	  

 
  
 
 
**** Table results
esttab, star(* 0.10 ** 0.05 *** 0.01) label noomitted nobase 
  
 

*** For Latex   
esttab using "C:/Users/Dell User/Dropbox/Wartimeleader/Paper/test1", replace b(3) se(3) label eqlabels(none) nonotes noomitted nobase nodepvars nogap nomtitle booktabs ///
star(* 0.10  ** .05 *** .01)  ///
stats(N r2, fmt(0 2) labels("N" "R2")) ///
        prefoot(" \addlinespace") postfoot("\bottomrule \end{tabular}}")

		

 
 
 
  

 
 
 
 
 
 
 
 
 
 
 
 
 
	  
 
 *****
 ***** Appendix: Potential Endogeneity for War performance and Type of coups (Negotiation Sample )
 ***** 
   
set more off	
eststo clear 


** Need to exclude military variable so that we can run th eodels.  
 

*****
 **** Personal 
 ***** 
 **** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth   gwf_personal  
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

 
 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth   gwf_personal    
if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

 	 
	 

 **** Number of Excluded Ethnic Groups (# excluded ethnic groups/# total ethnic groups)
 ***** 
 **** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth   excluded_relnumber
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

 
 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth   excluded_relnumber   
if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

 	 


*
  
 
****
**** Military Budget and Soldier Pay 
****

**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    ln_milex 
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

     

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
               ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    ln_milex  
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

 	  
 
 
 **** 
 **** Military expenditure / GDP (Logged)
 ****

**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    milbudget 
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

 
 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
               ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    milbudget  
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

 	  
 
 
****
**** Military Budget and Soldier Pay 
****

**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
                  ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    ln_solpay 
 if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

     

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem    N_Dyad
               ln_rgdpech_pwt ln_tpop   ln_statecoupmonth    ln_solpay   
if  (negotiation==1 & !(mean12_culp>1 & mean12_nonculp>1) )| (negotiation_nonculp_Fin_FirstL==1 & negotiation_culp_Fin_FirstL==1) , cluster(ccode) ;

 	  
 
 
 
  
 
 
**** Table results
esttab, star(* 0.10 ** 0.05 *** 0.01) label noomitted nobase 
  
 

*** For Latex   
esttab using "C:/Users/Dell User/Dropbox/Wartimeleader/Paper/test1", replace b(3) se(3) label eqlabels(none) nonotes noomitted nobase nodepvars nogap nomtitle booktabs ///
star(* 0.10  ** .05 *** .01)  ///
stats(N r2, fmt(0 2) labels("N" "R2")) ///
        prefoot(" \addlinespace") postfoot("\bottomrule \end{tabular}}")

		

 
 

  
  
  





 
 
 
 
 
 
 
 
******
*******
****** Different IV 
*****
******
 

set more off	
eststo clear 
 
 
 
****
***** Wartime 
***** 

**** H1  
# delimit; 
eststo:  relogit noninsidercoup   mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                    ln_rgdpech_pwt    ln_statecoupmonth   ln_milex   ln_solpay  
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup     mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean  gwf_dem  gwf_mil    N_Dyad
                       ln_rgdpech_pwt       ln_statecoupmonth    ln_milex  ln_solpay  
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    
	
** entry 

 **** H1  
# delimit; 
eststo:  relogit noninsidercoup   mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem   N_Dyad
                    ln_rgdpech_pwt    ln_statecoupmonth   ln_milex ln_solpay    regimecoup_entry regular_entry
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup     mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean  gwf_dem     N_Dyad
                       ln_rgdpech_pwt       ln_statecoupmonth ln_milex ln_solpay   regimecoup_entry regular_entry
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    
	
	
	
	
** entry 

 **** H1  
# delimit; 
eststo:  relogit noninsidercoup   mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem   N_Dyad
                    ln_rgdpech_pwt    ln_statecoupmonth   ln_milex ln_solpay    coup_entry regular_entry
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup     mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean  gwf_dem     N_Dyad
                       ln_rgdpech_pwt       ln_statecoupmonth ln_milex ln_solpay    coup_entry regular_entry
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 


 
	
** entry 

 **** H1  
# delimit; 
eststo:  relogit noninsidercoup   mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_personal    N_Dyad
                    ln_rgdpech_pwt    ln_statecoupmonth   ln_milex ln_solpay  
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup     mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean  gwf_dem   gwf_personal   N_Dyad
                       ln_rgdpech_pwt       ln_statecoupmonth ln_milex ln_solpay    
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 


 

** entry 

 **** H1  
# delimit; 
eststo:  relogit noninsidercoup   mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  N_Dyad
                    ln_rgdpech_pwt    ln_statecoupmonth   ln_milex ln_solpay  ln_warduration 
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 
    

 * H2 
# delimit; 
eststo:  relogit insidercoup     mean12_ab_culp_FinFirstL   mean12_ab_nonculp_FinFirstL    ln_mean12_best_est 
               ln_mean12_distance   lag1t25_fightcap_mean  gwf_dem   N_Dyad
                       ln_rgdpech_pwt       ln_statecoupmonth ln_milex ln_solpay    ln_warduration 
 if  ( sum11ps_best_est >=25   |sum12_best_est >=25  |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )
 ,  cluster(ccode); 


 
 
 
**** Table results
esttab, star(* 0.10 ** 0.05 *** 0.01) label noomitted nobase 
  
*****    
esttab using "C:/Users/Dell User/Dropbox/Wartimeleader/Paper/test1", replace b(3) se(3) label eqlabels(none) nonotes noomitted nobase nodepvars nogap nomtitle booktabs ///
star(* 0.10  ** .05 *** .01)  ///
stats(N r2, fmt(0 2) labels("N" "R2")) ///
        prefoot(" \addlinespace") postfoot("\bottomrule \end{tabular}}")

  
  
  
  
  
  
  
  
  
  
  
  
  
********************
********************  More than 50-Casualties or more than 1-Casualty 
********************
   
set more off	
eststo clear 

****** 
****** War Time 
****** 
 
**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop     ln_statecoupmonth ln_solpay
if  (  sum11ps_best_est >=1 |sum12_best_est >=1 |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )   
   ,  cluster(ccode);       
	  
	   
    

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay
if  (  sum11ps_best_est >=1 |sum12_best_est >=1 |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )   
   ,  cluster(ccode);       
	  
	  
    
	
	
********
******** With a Negotiation Control 
********
 
 
**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop     ln_statecoupmonth ln_solpay  negotiation
if  (  sum11ps_best_est >=1 |sum12_best_est >=1 |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )   
   ,  cluster(ccode);       
	  
	  

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay   negotiation 
if  (  sum11ps_best_est >=1 |sum12_best_est >=1 |ongoing25_cyr ==1   | lag1ongoing25_cyr==1 )   
   ,  cluster(ccode);       
	  
	  
 
****** 
****** War Time 
****** 
 
**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop     ln_statecoupmonth ln_solpay
 if  ( sum11ps_best_est >=50 |sum12_best_est >=50   ) 
   ,  cluster(ccode); 

    

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay
 if  ( sum11ps_best_est >=50 |sum12_best_est >=50   ) 
   ,  cluster(ccode); 

	  
    
	
	
********
******** With a Negotiation Control 
********
 
 
**** H1  
# delimit; 
eststo:  relogit noninsidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
               ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop     ln_statecoupmonth ln_solpay  negotiation
 if  ( sum11ps_best_est >=50 |sum12_best_est >=50   ) 
   ,  cluster(ccode); 
    
	  
	  

 * H2 
# delimit; 
eststo:  relogit insidercoup   ln_mean12_a_culp_FinFirstL    ln_mean12_a_nonculp_FinFirstL      ln_mean12_b  
                  ln_mean12_distance   lag1t25_fightcap_mean   gwf_dem  gwf_mil  N_Dyad
                  ln_rgdpech_pwt ln_tpop ln_statecoupmonth     ln_solpay   negotiation 
 if  ( sum11ps_best_est >=50 |sum12_best_est >=50   ) 
   ,  cluster(ccode); 
	  
	  
 
**** Table results
esttab, star(* 0.10 ** 0.05 *** 0.01) label noomitted nobase 
  
  
  
  
  
*****    
esttab using "C:/Users/Dell User/Dropbox/Wartimeleader/Paper/test1", replace b(3) se(3) label eqlabels(none) nonotes noomitted nobase nodepvars nogap nomtitle booktabs ///
star(* 0.10  ** .05 *** .01)  ///
stats(N r2, fmt(0 2) labels("N" "R2")) ///
        prefoot(" \addlinespace") postfoot("\bottomrule \end{tabular}}")

		
 
 
 
  
 
 
 

 ***** 
 *****
 ***** End 
 ***** 
 ***** 
 
 
 
  

 
  


 
  
